﻿<%@ Page Language="C#" MasterPageFile="~/MasterPages/AdminMaster.master" AutoEventWireup="true"
    CodeFile="EmailServerMaster.aspx.cs" Inherits="Admin_EmailServerMaster" %>

<script runat="server">

   
</script>


<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    
    <table style="width: 100%" id="TABLE1" cellspacing="1" cellpadding="1" border="0">
        <tbody>
            <tr>
                <td style="height: 30px; text-align: center" colspan="3">
                    <table id="TABLE3"  style="vertical-align: middle;width: 100%;" >
                        <tbody>
                            <tr>
                                <td colspan="2" style="text-align: left;">
                                    <h2>Email Server Master</h2>
                                </td>
                            </tr>
                            <tr>
                                <td style="vertical-align: middle;width: 20%;" align="right" class="auto-style3">
                                           Server Name&nbsp;&nbsp;:&nbsp;&nbsp;
                                        </td>
                               <td style="width: 30%;vertical-align: middle;">
                                            <asp:TextBox ID="txtActivityTypeName" runat="server" Width="245px" MaxLength="50"></asp:TextBox></td>
                                    
                                <td align="left" class="auto-style2" style="width: 50%">&nbsp;
                                            <asp:Button ID="btnSearch" OnClick="BtnSearch_OnClick" runat="server"
                                                Text="Search" CausesValidation="false"></asp:Button>
                                                &nbsp;&nbsp;
                                            <asp:Button ID="btnClear" OnClick="BtnClear_OnClick" runat="server"
                                                Text="Clear" CausesValidation="false"></asp:Button>&nbsp;&nbsp;
                                    <asp:Button ID="btnAddNew" OnClick="btnAddNew_OnClick" runat="server"
                                        Text="Add New Email" CausesValidation="false"></asp:Button></td>
                                
                            </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
             <tr>
                <td colspan="3"> <br />
                    </td>
                 </tr>
             <tr>
                <td colspan="3" style="text-align:center;"> <asp:Label runat="server" ID="lblErrorMessage"  ></asp:Label>
                    </td>
                 </tr>
            <tr>
                <td align="center"  colspan="3">
                    <div class="grd_table" style="overflow-x: auto; width: 950px;">                   
                        <asp:GridView ID="gvLanguage" runat="server" DataKeyNames="EmailServerID" AllowPaging="True" Width="70%"
                            AutoGenerateColumns="False" OnPageIndexChanging="gvLanguage_PageIndexChanging" OnRowDataBound="gvLanguage_RowDataBound" OnRowDeleting="gvLanguage_RowDeleting" OnRowEditing="gvLanguage_RowEditing">
                            <Columns>
                               <asp:BoundField DataField="EmailServerID" HeaderText="EmailServer ID"  Visible="false">
                                    <ItemStyle   HorizontalAlign="Left" />
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:BoundField>
                                <asp:BoundField DataField="SMTPServer" HeaderText="SMTP Server">
                                    <ItemStyle Width="20%" HorizontalAlign="Left" />
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:BoundField>  
                                 <asp:BoundField DataField="SMTPServerEmail" HeaderText="SMTP Server Email" />
                                <asp:BoundField DataField="SiteURL" HeaderText="Site URL" />
                                 <asp:BoundField DataField="ActiveStatus" HeaderText="Status">
                                    <ItemStyle Width="15%" />
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:BoundField> 
                                <asp:HyperLinkField DataNavigateUrlFields="EmailServerID" DataNavigateUrlFormatString="~/Admin/EmailServerMasterModify.aspx?lgid={0}&amp;mod=up"
                            HeaderText="Edit" Text="Edit" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left">
<ItemStyle HorizontalAlign="Left" Width="10%"></ItemStyle>
                                </asp:HyperLinkField>
                                 <asp:TemplateField HeaderText="Delete">
                                      <ItemStyle Width="10%" HorizontalAlign="Left" />
                                 <ItemTemplate>
                                   <asp:LinkButton ID="lnkDelete" CommandArgument='<%# Eval("EmailServerID") %>' CommandName="Delete" runat="server"><%# Convert.ToBoolean(Eval("IsActive")) == false ? "Activate" : "Delete"%></asp:LinkButton>
                                 </ItemTemplate>
                               </asp:TemplateField>
                            </Columns>
                             <FooterStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#E2DED6" ForeColor="blue" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <EditRowStyle BackColor="#CCCCCC" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                        </asp:GridView>
                    </div>
                </td>
            </tr>
            <tr>
                <td align="right" colspan="3">
                    <input id="hdnInput" runat="server" type="hidden" />
                   
                </td>
            </tr>
        </tbody>
    </table>
         
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="head">
    <style type="text/css">
        .auto-style2 {
            width: 114px;
        }

        .auto-style3 {
            width: 96px;
        }

        </style>
</asp:Content>

